package com.atguigu.lease.common.utils;

import java.util.Random;

public class CodeUtil {

    public static String createCode(Integer length) {
        StringBuilder sb = new StringBuilder();
        Random random = new Random();

        for (int i = 0; i < length; i++) {
            int nextInt = random.nextInt(10);
            sb.append(nextInt);
        }

        return sb.toString();

    }

}
